home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / ww_tv.exe / README.TXT < prev    next >
Text File  |  1992-08-25  |  6KB  |  139 lines

  1. Copyright 1992 Primatech Inc.  All rights reserved.         24 August 1992
  2.  
  3. I have made a few changes to the code in this archive.  The only externally
  4. visible change is the addition of the "retChar" field to TEditor.  This
  5. enables you to set the display character that represents a hard return. 
  6. The other changes were mostly small changes made over the past few months
  7. to correct problems or enhance performance.  Many of them should be
  8. documented in affected modules.
  9.  
  10. These modules have been synchronized with the version of TurboVision that
  11. was released with Borland C++ & AF 3.1 (1.03).  It has been tested, but not
  12. extensively.  As before, I do not promise anything, and cannot provide much
  13. support, but comments are welcomed.
  14.  
  15.  
  16.  
  17. Copyright 1992 Primatech Inc.  All rights reserved.         3 January 1992
  18.  
  19. This package includes the modules necessary to implement a word wrapping
  20. editor in Borland's TurboVision for C++.  Although I wanted to derive this
  21. class from the existing TEditor class, after some research, I determined
  22. that the TEditor class was not flexible enough to support this.  Because of
  23. this, the approach that we took was to actually modify and add to the
  24. existing TEditor code that was provided by Borland.  Because we wanted to
  25. provide compatibility with the existing code, and we did not want to
  26. duplicate all of the existing functions, the new wordwrapping editor is
  27. still called TEditor.  The new features are activated by setting the new
  28. Boolean field "wordWrap" to True.  Other new fields (documented later)
  29. control other features.  In its default configuration, the TEditor class
  30. should be compatible with the version provided by Borland.
  31.  
  32. This implementation was designed and coded by Jeff Hottle and John
  33. Swartzentruber of Primatech Inc.  This code has been tested enough for
  34. the major bugs to become apparent.  It is quite possible that other bugs
  35. or problems remain in the code.  We make no promises about the stability
  36. or suitability of this code.  Any use of these modules is at your own
  37. risk.
  38.  
  39. These changes were developed with the TurboVision that was distributed
  40. with BC++ 2.0.  I have since incorporated some of the (minor) changes
  41. made in the version distributed with BC++ 3.0.  I compiled and ran a
  42. small program and it seemed to work.
  43.  
  44. None of these modules is placed in the public domain.  All original
  45. TurboVision modules are still Copyright 1991 by Borland International.  The
  46. new modules that we have provided are Copyright 1991 by Primatech Inc.  All
  47. rights reserved.  You have the permission of Primatech Inc. to use these
  48. modules as you wish.  You may not, however, distribute the source code
  49. unless this file is included and no modifications have been made to any of
  50. the source code modules.  Any restrictions that Borland has placed on the
  51. use and distribution of TurboVision modules still apply to those modules.
  52.  
  53.  
  54. USING THESE CHANGES:
  55. -------------------
  56.  
  57. Because of the changes made to TV header files, the entire library must
  58. be rebuilt.  I have also included modified modules from the TVEdit demo
  59. program that can be used to demonstrate these changes.  They are real
  60. Q&D, so don't use them as a good example.
  61.  
  62. Before you rebuild the library, make sure that you rebuild the GENINC
  63. program and use it to create TVWRITE.INC.  I believe the standard batch
  64. files will do this.
  65.  
  66. You will need to remove the stack checking code in TView.cpp.  It is only
  67. used during development to determine where the highest stack usage is.
  68.  
  69.  
  70. DOCUMENTATION:
  71. -------------
  72.  
  73. As will soon become apparent, there is no documentation.  Although we
  74. would both like it to be fully documented, you would probably never get
  75. it if we waited that long.  I will attempt to answer answer your
  76. questions if it doesn't get too time consuming.  I would also appreciate
  77. any bug reports, but I can't promise that I will be able to provide
  78. immediate responses.
  79.  
  80.  
  81. Additional TEditor Fields:
  82. -------------------------
  83.  
  84. Boolean wordWrap         If set to True, wordwrapping will take place.  If
  85.                          set to False, TEditor should act like the
  86.                          original version.
  87.  
  88. ushort rMargin           This is the right margin.  If word wrapping is
  89.                          turned on, this is where the text will wrap.
  90.  
  91. Boolean autosizeMargin   If this is set to True, the rMargin value will
  92.                          automatically change when the size of the
  93.                          TEditor view changes.
  94.  
  95. uchar tabSize            The space between tab stops.  Although not part
  96.                          of wordwrapping, an important enhancement to the
  97.                          original (which had 8 hardcoded).
  98.  
  99. char retChar             The display character used to represent a hard
  100.                          return.  The default is a space.
  101.  
  102.  
  103.  
  104. OTHER CHANGES:
  105. -------------
  106.  
  107. Notice that some of the TEditor member function declarations have been
  108. changed to add some new fields.  Also notice that some functions have
  109. been put inline or made const.
  110.  
  111. The shiftstate was added to TEvent.  This is not yet used everywhere,
  112. but a number of uses of the BIOS data area have been changed to use the
  113. shiftstate in the event.  I made this change so that the shiftstate is
  114. bound with the key that causes the event.  This is important when
  115. implementing an event recording feature for keyboard macros.
  116.  
  117.  
  118. TECHNICAL APPROACH:
  119. ------------------
  120.  
  121. There are a number of ways that word wrapping can be implemented. Because
  122. we were interested in keeping as much of the existing code as possible,
  123. we decided to insert end of line codes into the text buffer. The code
  124. that we chose was a single carriage return (CR) character (character
  125. 13).  We call it a soft return.  User entered end of line codes are
  126. referred to as hard returns.  A hard return is made up of a carriage
  127. return followed by a line feed ("\r\n" or "\x0D\x0A").
  128.  
  129.  
  130.  
  131. John L. Swartzentruber CIS:76646,1430
  132. Jeff A. Hottle
  133.  
  134. Primatech Inc.
  135. 445 Hutchinson Ave, Suite 200
  136. Columbus, Ohio 43235
  137.  
  138. FAX: (614) 841-9805
  139.